package net.begincode.servlet.common;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import utils.BQStringUtil;

import com.google.gson.Gson;

import net.begincode.bean.BcUser;
import net.begincode.servlet.common.BaseServlet;

public class GotoServlet extends BaseServlet{
	private static final Log LOG = LogFactory.getLog(GotoServlet.class);
	
	/**
	 * 进入程序界面
	 * */
	public void gotoPage(HttpServletRequest request, HttpServletResponse response){
		try {
			String jspPage = request.getParameter("page");
			request.getRequestDispatcher("/WEB-INF/page/"+jspPage+".jsp").forward(request, response);
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * 进入管理
	 * */
	public void gotoManagePage(HttpServletRequest request, HttpServletResponse response){
		try {
			String jspPage = request.getParameter("page");
			request.getRequestDispatcher("/WEB-INF/manage/"+jspPage+".jsp").forward(request, response);
		} catch (ServletException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
 
}
